package airlinesystem;

import java.util.HashSet;
import java.util.Set;

/**
 * Represents the role of being a passenger on a flight
 * @author Robert Maaskant & Dennis van der Zwet
 *
 */
public class PassengerRole extends PersonRole
{
  /**
   * The bookings this person has made
   */
  private Set<Booking> bookings;
 
  /**
   * Constructor for person
   * @param person
   */
  public PassengerRole(Person person)
  {
    super(person);
    bookings = new HashSet<Booking>();
  }

  /**
   * Adds a booking this passenger made
   * @param b
   */
  public void addBooking(Booking b)
  {
    bookings.add(b);
  }
  
  /**
   * Returns the bookings for this passenger
   * @return the bookings for this passenger
   */
  public Set<Booking> getBookings()
  {
    return new HashSet<Booking>(bookings);
  }
}
